﻿//-----------------------------------------------------------------------
// <copyright file="IData.cs" company="FastNET Services">
//     Copyright (c) 2008-2013. All Rights Reserved.
// </copyright>
// <license>
//     GPLv2
// </license>
// <warranty>
//     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
//     BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
//     DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// </warranty>
//-----------------------------------------------------------------------
#region Usings
using System;
using FastNet.RepositorySystem;
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endregion

namespace RepositorySystem.Test
{
    [TestClass]
    public class IdentityTest
    {
        //TODO : Test more types

        #region CanFitInGuid

        [TestMethod]
        public void IdentityTest_CanFitInGuid_Int64()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsFalse(item.CanFitInGuid());
        }

        [TestMethod]
        public void IdentityTest_CanFitInGuid_Int32()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsFalse(item.CanFitInGuid());
        }

        [TestMethod]
        public void IdentityTest_CanFitInGuid_Int16()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsFalse(item.CanFitInGuid());
        }

        [TestMethod]
        public void IdentityTest_CanFitInGuid_Guid()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsTrue(item.CanFitInGuid());
        }

        #endregion

        #region CanFitInInt16

        [TestMethod]
        public void IdentityTest_CanFitInInt16_Byte()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsTrue(item.CanFitInInt16());
        }

        [TestMethod]
        public void IdentityTest_CanFitInInt16_Int64()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsFalse(item.CanFitInInt16());
        }

        [TestMethod]
        public void IdentityTest_CanFitInInt16_Int32()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsFalse(item.CanFitInInt16());
        }

        [TestMethod]
        public void IdentityTest_CanFitInInt16_Int16()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsTrue(item.CanFitInInt16());
        }

        [TestMethod]
        public void IdentityTest_CanFitInInt16_Guid()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.CanFitInInt16());
        }

        #endregion

        #region CanFitInInt32

        [TestMethod]
        public void IdentityTest_CanFitInInt32_Byte()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsTrue(item.CanFitInInt32());
        }

        [TestMethod]
        public void IdentityTest_CanFitInInt32_Int64()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsFalse(item.CanFitInInt32());
        }

        [TestMethod]
        public void IdentityTest_CanFitInInt32_Int32()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsTrue(item.CanFitInInt32());
        }

        [TestMethod]
        public void IdentityTest_CanFitInInt32_Int16()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsTrue(item.CanFitInInt32());
        }

        [TestMethod]
        public void IdentityTest_CanFitInInt32_Guid()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.CanFitInInt32());
        }

        #endregion

        #region CanFitInInt64

        [TestMethod]
        public void IdentityTest_CanFitInInt64_Byte()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsTrue(item.CanFitInInt64());
        }

        [TestMethod]
        public void IdentityTest_CanFitInInt64_Int64()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsTrue(item.CanFitInInt64());
        }

        [TestMethod]
        public void IdentityTest_CanFitInInt64_Int32()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsTrue(item.CanFitInInt64());
        }

        [TestMethod]
        public void IdentityTest_CanFitInInt64_Int16()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsTrue(item.CanFitInInt64());
        }

        [TestMethod]
        public void IdentityTest_CanFitInInt64_Guid()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.CanFitInInt64());
        }

        #endregion

        #region ToType

        [TestMethod]
        [ExpectedException(typeof(InvalidCastException))]
        public void IdentityTest_ToType_Guid_Int64()
        {
            Guid testValue = Guid.NewGuid();
            Identity item = new Identity(testValue);

            //Expected error. Guid is not convertible to IConvertible
            ((IConvertible)item).ToType(typeof(Int64), null);
        }

        [TestMethod]
        public void IdentityTest_ToType_Guid_SameAsInternal()
        {
            Guid testValue = Guid.NewGuid();
            Identity item = new Identity(testValue);
            Assert.AreEqual(((IConvertible)item).ToType(typeof(Guid), null), testValue, "Object not equal");
        }

        [TestMethod]
        public void IdentityTest_ToType_Int32_SameAsInternal()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.AreEqual(((IConvertible)item).ToType(typeof(Int32), null), Int32.MaxValue, "Object not equal");
        }

        [TestMethod]
        public void IdentityTest_ToType_Int32_Int64()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.AreEqual(((IConvertible)item).ToType(typeof(Int64), null), (Int64)Int32.MaxValue, "Object not equal");
        }

        #endregion



        //COMPLETE

        #region GetTypeCode

        [TestMethod]
        public void IdentityTest_GetTypeCode_Byte()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.AreEqual(((IConvertible)item).GetTypeCode(), TypeCode.Byte, "Mismatched internal type code");
        }

        [TestMethod]
        public void IdentityTest_GetTypeCode_Int16()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.AreEqual(((IConvertible)item).GetTypeCode(), TypeCode.Int16, "Mismatched internal type code");
        }

        [TestMethod]
        public void IdentityTest_GetTypeCode_Int32()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.AreEqual(((IConvertible)item).GetTypeCode(), TypeCode.Int32, "Mismatched internal type code");
        }

        [TestMethod]
        public void IdentityTest_GetTypeCode_Int64()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.AreEqual(((IConvertible)item).GetTypeCode(), TypeCode.Int64, "Mismatched internal type code");
        }

        [TestMethod]
        public void IdentityTest_GetTypeCode_SByte()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.AreEqual(((IConvertible)item).GetTypeCode(), TypeCode.SByte, "Mismatched internal type code");
        }

        [TestMethod]
        public void IdentityTest_GetTypeCode_UInt16()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.AreEqual(((IConvertible)item).GetTypeCode(), TypeCode.UInt16, "Mismatched internal type code");
        }

        [TestMethod]
        public void IdentityTest_GetTypeCode_UInt32()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.AreEqual(((IConvertible)item).GetTypeCode(), TypeCode.UInt32, "Mismatched internal type code");
        }

        [TestMethod]
        public void IdentityTest_GetTypeCode_UInt64()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.AreEqual(((IConvertible)item).GetTypeCode(), TypeCode.UInt64, "Mismatched internal type code");
        }

        [TestMethod]
        public void IdentityTest_GetTypeCode_Single()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.AreEqual(((IConvertible)item).GetTypeCode(), TypeCode.Single, "Mismatched internal type code");
        }

        [TestMethod]
        public void IdentityTest_GetTypeCode_Double()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.AreEqual(((IConvertible)item).GetTypeCode(), TypeCode.Double, "Mismatched internal type code");
        }

        [TestMethod]
        public void IdentityTest_GetTypeCode_Decimal()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.AreEqual(((IConvertible)item).GetTypeCode(), TypeCode.Decimal, "Mismatched internal type code");
        }

        [TestMethod]
        public void IdentityTest_GetTypeCode_Char()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.AreEqual(((IConvertible)item).GetTypeCode(), TypeCode.Char, "Mismatched internal type code");
        }

        [TestMethod]
        public void IdentityTest_GetTypeCode_Boolean()
        {
            Identity item = new Identity(true);
            Assert.AreEqual(((IConvertible)item).GetTypeCode(), TypeCode.Boolean, "Mismatched internal type code");
        }

        [TestMethod]
        public void IdentityTest_GetTypeCode_DateTime()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.AreEqual(((IConvertible)item).GetTypeCode(), TypeCode.DateTime, "Mismatched internal type code");
        }

        #endregion

        #region IsConvertible

        #region UInt64

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt64_UInt16()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt64_UInt32()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt64_UInt64()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt64_Int16()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt64_Int32()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt64_Int64()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt64_Guid()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Guid)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt64_DateTime()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(DateTime)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt64_Byte()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Byte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt64_SByte()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(SByte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt64_Single()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Single)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt64_Double()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Double)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt64_Decimal()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Decimal)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt64_Char()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Char)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt64_Boolean()
        {
            Identity item = new Identity(UInt64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Boolean)), "Item Converter Error");
        }

        #endregion

        #region UInt32

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt32_UInt16()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt32_UInt32()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt32_UInt64()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt32_Int16()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt32_Int32()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt32_Int64()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt32_Guid()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Guid)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt32_DateTime()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(DateTime)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt32_Byte()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Byte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt32_SByte()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(SByte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt32_Single()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Single)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt32_Double()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Double)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt32_Decimal()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Decimal)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt32_Char()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Char)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt32_Boolean()
        {
            Identity item = new Identity(UInt32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Boolean)), "Item Converter Error");
        }

        #endregion

        #region UInt16

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt16_UInt16()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt16_UInt32()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt16_UInt64()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt16_Int16()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt16_Int32()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt16_Int64()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt16_Guid()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Guid)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt16_DateTime()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(DateTime)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt16_Byte()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Byte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt16_SByte()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(SByte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt16_Single()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Single)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt16_Double()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Double)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt16_Decimal()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Decimal)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt16_Char()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Char)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_UInt16_Boolean()
        {
            Identity item = new Identity(UInt16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Boolean)), "Item Converter Error");
        }

        #endregion

        #region Int64

        [TestMethod]
        public void IdentityTest_IsConvertible_Int64_UInt16()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int64_UInt32()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int64_UInt64()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int64_Int16()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int64_Int32()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int64_Int64()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int64_Guid()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Guid)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int64_DateTime()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(DateTime)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int64_Byte()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Byte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int64_SByte()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(SByte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int64_Single()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Single)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int64_Double()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Double)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int64_Decimal()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Decimal)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int64_Char()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Char)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int64_Boolean()
        {
            Identity item = new Identity(Int64.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Boolean)), "Item Converter Error");
        }

        #endregion

        #region Int32

        [TestMethod]
        public void IdentityTest_IsConvertible_Int32_UInt16()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int32_UInt32()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int32_UInt64()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int32_Int16()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int32_Int32()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int32_Int64()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int32_Guid()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Guid)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int32_DateTime()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(DateTime)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int32_Byte()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Byte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int32_SByte()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(SByte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int32_Single()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Single)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int32_Double()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Double)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int32_Decimal()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Decimal)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int32_Char()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Char)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int32_Boolean()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Boolean)), "Item Converter Error");
        }

        #endregion

        #region Int16

        [TestMethod]
        public void IdentityTest_IsConvertible_Int16_UInt16()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int16_UInt32()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int16_UInt64()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int16_Int16()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int16_Int32()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int16_Int64()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int16_Guid()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Guid)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int16_DateTime()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(DateTime)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int16_Byte()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Byte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int16_SByte()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(SByte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int16_Single()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Single)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int16_Double()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Double)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int16_Decimal()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Decimal)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int16_Char()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Char)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Int16_Boolean()
        {
            Identity item = new Identity(Int16.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Boolean)), "Item Converter Error");
        }

        #endregion

        #region Single

        [TestMethod]
        public void IdentityTest_IsConvertible_Single_UInt16()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Single_UInt32()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Single_UInt64()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Single_Int16()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Single_Int32()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Single_Int64()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Single_Guid()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Guid)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Single_DateTime()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(DateTime)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Single_Byte()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Byte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Single_SByte()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(SByte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Single_Single()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Single)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Single_Double()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Double)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Single_Decimal()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Decimal)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Single_Char()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Char)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Single_Boolean()
        {
            Identity item = new Identity(Single.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Boolean)), "Item Converter Error");
        }

        #endregion

        #region Double

        [TestMethod]
        public void IdentityTest_IsConvertible_Double_UInt16()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Double_UInt32()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Double_UInt64()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Double_Int16()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Double_Int32()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Double_Int64()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Double_Guid()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Guid)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Double_DateTime()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(DateTime)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Double_Byte()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Byte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Double_SByte()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(SByte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Double_Single()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Single)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Double_Double()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Double)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Double_Decimal()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Decimal)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Double_Char()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Char)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Double_Boolean()
        {
            Identity item = new Identity(Double.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Boolean)), "Item Converter Error");
        }

        #endregion

        #region Decimal

        [TestMethod]
        public void IdentityTest_IsConvertible_Decimal_UInt16()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Decimal_UInt32()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Decimal_UInt64()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Decimal_Int16()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Decimal_Int32()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Decimal_Int64()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Decimal_Guid()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Guid)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Decimal_DateTime()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(DateTime)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Decimal_Byte()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Byte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Decimal_SByte()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(SByte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Decimal_Single()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Single)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Decimal_Double()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Double)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Decimal_Decimal()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Decimal)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Decimal_Char()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Char)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Decimal_Boolean()
        {
            Identity item = new Identity(Decimal.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Boolean)), "Item Converter Error");
        }

        #endregion

        #region Char

        [TestMethod]
        public void IdentityTest_IsConvertible_Char_UInt16()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(UInt16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Char_UInt32()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(UInt32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Char_UInt64()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(UInt64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Char_Int16()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Int16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Char_Int32()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Int32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Char_Int64()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Int64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Char_Guid()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Guid)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Char_DateTime()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(DateTime)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Char_Byte()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Byte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Char_SByte()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(SByte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Char_Single()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Single)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Char_Double()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Double)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Char_Decimal()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Decimal)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Char_Char()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Char)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Char_Boolean()
        {
            Identity item = new Identity(Char.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Boolean)), "Item Converter Error");
        }

        #endregion

        #region Byte

        [TestMethod]
        public void IdentityTest_IsConvertible_Byte_UInt16()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Byte_UInt32()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Byte_UInt64()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Byte_Int16()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Byte_Int32()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Byte_Int64()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Byte_Guid()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Guid)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Byte_DateTime()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(DateTime)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Byte_Byte()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Byte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Byte_SByte()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(SByte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Byte_Single()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Single)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Byte_Double()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Double)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Byte_Decimal()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Decimal)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Byte_Char()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Char)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Byte_Boolean()
        {
            Identity item = new Identity(Byte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Boolean)), "Item Converter Error");
        }

        #endregion

        #region SByte

        [TestMethod]
        public void IdentityTest_IsConvertible_SByte_UInt16()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_SByte_UInt32()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_SByte_UInt64()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(UInt64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_SByte_Int16()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_SByte_Int32()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_SByte_Int64()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Int64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_SByte_Guid()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Guid)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_SByte_DateTime()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(DateTime)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_SByte_Byte()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Byte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_SByte_SByte()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(SByte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_SByte_Single()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Single)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_SByte_Double()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Double)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_SByte_Decimal()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Decimal)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_SByte_Char()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Char)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_SByte_Boolean()
        {
            Identity item = new Identity(SByte.MaxValue);
            Assert.IsTrue(item.IsConvertible(typeof(Boolean)), "Item Converter Error");
        }

        #endregion

        #region Boolean

        [TestMethod]
        public void IdentityTest_IsConvertible_Boolean_UInt16()
        {
            Identity item = new Identity(true);
            Assert.IsFalse(item.IsConvertible(typeof(UInt16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Boolean_UInt32()
        {
            Identity item = new Identity(true);
            Assert.IsFalse(item.IsConvertible(typeof(UInt32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Boolean_UInt64()
        {
            Identity item = new Identity(true);
            Assert.IsFalse(item.IsConvertible(typeof(UInt64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Boolean_Int16()
        {
            Identity item = new Identity(true);
            Assert.IsFalse(item.IsConvertible(typeof(Int16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Boolean_Int32()
        {
            Identity item = new Identity(true);
            Assert.IsFalse(item.IsConvertible(typeof(Int32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Boolean_Int64()
        {
            Identity item = new Identity(true);
            Assert.IsFalse(item.IsConvertible(typeof(Int64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Boolean_Guid()
        {
            Identity item = new Identity(true);
            Assert.IsFalse(item.IsConvertible(typeof(Guid)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Boolean_DateTime()
        {
            Identity item = new Identity(true);
            Assert.IsFalse(item.IsConvertible(typeof(DateTime)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Boolean_Byte()
        {
            Identity item = new Identity(true);
            Assert.IsFalse(item.IsConvertible(typeof(Byte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Boolean_SByte()
        {
            Identity item = new Identity(true);
            Assert.IsFalse(item.IsConvertible(typeof(SByte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_BooleanSingle()
        {
            Identity item = new Identity(true);
            Assert.IsFalse(item.IsConvertible(typeof(Single)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Boolean_Double()
        {
            Identity item = new Identity(true);
            Assert.IsFalse(item.IsConvertible(typeof(Double)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Boolean_Decimal()
        {
            Identity item = new Identity(true);
            Assert.IsFalse(item.IsConvertible(typeof(Decimal)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Boolean_Char()
        {
            Identity item = new Identity(true);
            Assert.IsFalse(item.IsConvertible(typeof(Char)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Boolean_Boolean()
        {
            Identity item = new Identity(true);
            Assert.IsFalse(item.IsConvertible(typeof(Boolean)), "Item Converter Error");
        }

        #endregion

        #region SByte

        [TestMethod]
        public void IdentityTest_IsConvertible_DateTime_UInt16()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(UInt16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_DateTime_UInt32()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(UInt32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_DateTime_UInt64()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(UInt64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_DateTime_Int16()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Int16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_DateTime_Int32()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Int32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_DateTime_Int64()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Int64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_DateTime_Guid()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Guid)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_DateTime_DateTime()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(DateTime)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_DateTime_Byte()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Byte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_DateTime_SByte()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(SByte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_DateTime_Single()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Single)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_DateTime_Double()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Double)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_DateTime_Decimal()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Decimal)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_DateTime_Char()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Char)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_DateTime_Boolean()
        {
            Identity item = new Identity(DateTime.MaxValue);
            Assert.IsFalse(item.IsConvertible(typeof(Boolean)), "Item Converter Error");
        }

        #endregion

        #region Guid

        [TestMethod]
        public void IdentityTest_IsConvertible_Guid_UInt16()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.IsConvertible(typeof(UInt16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Guid_UInt32()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.IsConvertible(typeof(UInt32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Guid_UInt64()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.IsConvertible(typeof(UInt64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Guid_Int16()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.IsConvertible(typeof(Int16)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Guid_Int32()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.IsConvertible(typeof(Int32)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Guid_Int64()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.IsConvertible(typeof(Int64)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Guid_Guid()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.IsConvertible(typeof(Guid)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Guid_DateTime()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.IsConvertible(typeof(DateTime)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Guid_Byte()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.IsConvertible(typeof(Byte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Guid_SByte()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.IsConvertible(typeof(SByte)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Guid_Single()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.IsConvertible(typeof(Single)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Guid_Double()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.IsConvertible(typeof(Double)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Guid_Decimal()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.IsConvertible(typeof(Decimal)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Guid_Char()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.IsConvertible(typeof(Char)), "Item Converter Error");
        }

        [TestMethod]
        public void IdentityTest_IsConvertible_Guid_Boolean()
        {
            Identity item = new Identity(Guid.NewGuid());
            Assert.IsFalse(item.IsConvertible(typeof(Boolean)), "Item Converter Error");
        }

        #endregion

        #endregion

        #region UnderlyingType

        [TestMethod]
        public void IdentityTest_UnderlyingType_EmptyIdentity()
        {
            Identity item = new Identity();
            Assert.AreEqual(item.UnderlyingType(), typeof(Identity), "Object not equal");
        }

        [TestMethod]
        public void IdentityTest_UnderlyingType_Initialized()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.AreEqual(item.UnderlyingType(), typeof(Int32), "Object not equal");
        }

        #endregion

        #region IsInternalType

        [TestMethod]
        public void IdentityTest_IsInternalType_EmptyIdentity()
        {
            Identity item = new Identity();
            Assert.IsFalse(item.IsInternalType(typeof(Int32)), "Object equal");
        }

        [TestMethod]
        public void IdentityTest_IsInternalType_Initialized_Match()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsTrue(item.IsInternalType(typeof(Int32)), "Object not equal");
        }

        [TestMethod]
        public void IdentityTest_IsInternalType_Initialized_Mismatch()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.IsFalse(item.IsInternalType(typeof(Int64)), "Object equal");
        }

        #endregion

        #region ToString

        [TestMethod]
        public void IdentityTest_ToString_EmptyIdentity()
        {
            Identity item = new Identity();
            Assert.AreEqual(item.ToString(), "{Identity Empty}", "Object not equal");
        }

        [TestMethod]
        public void IdentityTest_ToString_Initialized()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.AreEqual(item.ToString(), Int32.MaxValue.ToString(), "Object not equal");
        }

        #endregion

        #region GetHashCode

        [TestMethod]
        public void IdentityTest_GetHashCode_EmptyIdentity()
        {
            Identity item = new Identity();
            Assert.AreEqual(item.GetHashCode(), "{Identity Empty}".GetHashCode(), "Object not equal");
        }

        [TestMethod]
        public void IdentityTest_GetHashCode_Initialized()
        {
            Identity item = new Identity(Int32.MaxValue);
            Assert.AreEqual(item.GetHashCode(), Int32.MaxValue.ToString().GetHashCode(), "Object not equal");
        }

        #endregion

        #region Equals

        #region SameAsInternal

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_Int64()
        {
            ValueType source = Int64.MaxValue;
            Identity item = new Identity(source);

            Assert.IsTrue(item.Equals(source), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_Int32()
        {
            ValueType source = Int32.MaxValue;
            Identity item = new Identity(source);

            Assert.IsTrue(item.Equals(source), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_Int16()
        {
            ValueType source = Int16.MaxValue;
            Identity item = new Identity(source);

            Assert.IsTrue(item.Equals(source), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_UInt64()
        {
            ValueType source = UInt64.MaxValue;
            Identity item = new Identity(source);

            Assert.IsTrue(item.Equals(source), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_UInt32()
        {
            ValueType source = UInt32.MaxValue;
            Identity item = new Identity(source);

            Assert.IsTrue(item.Equals(source), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_UInt16()
        {
            ValueType source = UInt16.MaxValue;
            Identity item = new Identity(source);

            Assert.IsTrue(item.Equals(source), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_Decimal()
        {
            ValueType source = Decimal.MaxValue;
            Identity item = new Identity(source);

            Assert.IsTrue(item.Equals(source), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_Single()
        {
            ValueType source = Single.MaxValue;
            Identity item = new Identity(source);

            Assert.IsTrue(item.Equals(source), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_Double()
        {
            ValueType source = Double.MaxValue;
            Identity item = new Identity(source);

            Assert.IsTrue(item.Equals(source), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_Char()
        {
            ValueType source = Char.MaxValue;
            Identity item = new Identity(source);

            Assert.IsTrue(item.Equals(source), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_Byte()
        {
            ValueType source = Byte.MaxValue;
            Identity item = new Identity(source);

            Assert.IsTrue(item.Equals(source), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_SByte()
        {
            ValueType source = SByte.MaxValue;
            Identity item = new Identity(source);

            Assert.IsTrue(item.Equals(source), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DateTime()
        {
            ValueType source = DateTime.MaxValue;
            Identity item = new Identity(source);

            Assert.IsTrue(item.Equals(source), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_Boolean()
        {
            ValueType source = true;
            Identity item = new Identity(source);

            Assert.IsTrue(item.Equals(source), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_Guid()
        {
            ValueType source = Guid.NewGuid();
            Identity item = new Identity(source);

            Assert.IsTrue(item.Equals(source), "Object does not equal comparison value");
        }

        #endregion

        #region SameAsInternal DifferentValue

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DifferentValue_Int64()
        {
            ValueType source = Int64.MaxValue;
            ValueType dest = Int64.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DifferentValue_Int32()
        {
            ValueType source = Int32.MaxValue;
            ValueType dest = Int32.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DifferentValue_Int16()
        {
            ValueType source = Int16.MaxValue;
            ValueType dest = Int16.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DifferentValue_UInt64()
        {
            ValueType source = UInt64.MaxValue;
            ValueType dest = UInt64.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DifferentValue_UInt32()
        {
            ValueType source = UInt32.MaxValue;
            ValueType dest = UInt32.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DifferentValue_UInt16()
        {
            ValueType source = UInt16.MaxValue;
            ValueType dest = UInt16.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DifferentValue_Decimal()
        {
            ValueType source = Decimal.MaxValue;
            ValueType dest = Decimal.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DifferentValue_Single()
        {
            ValueType source = Single.MaxValue;
            ValueType dest = Single.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DifferentValue_Double()
        {
            ValueType source = Double.MaxValue;
            ValueType dest = Double.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DifferentValue_Char()
        {
            ValueType source = Char.MaxValue;
            ValueType dest = Char.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DifferentValue_Byte()
        {
            ValueType source = Byte.MaxValue;
            ValueType dest = Byte.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DifferentValue_SByte()
        {
            ValueType source = SByte.MaxValue;
            ValueType dest = SByte.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DifferentValue_DateTime()
        {
            ValueType source = DateTime.MaxValue;
            ValueType dest = DateTime.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DifferentValue_Boolean()
        {
            ValueType source = true;
            ValueType dest = false;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_SameAsInternal_DifferentValue_Guid()
        {
            ValueType source = Guid.NewGuid();
            ValueType dest = Guid.NewGuid();
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        #endregion

        #region DifferentAsInternal

        [TestMethod]
        public void IdentityTest_Equals_DifferentAsInternal_Int64()
        {
            ValueType source = Int64.MaxValue;
            ValueType dest = UInt64.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_DifferentAsInternal_Int32()
        {
            ValueType source = Int32.MaxValue;
            ValueType dest = UInt32.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_DifferentAsInternal_Int16()
        {
            ValueType source = Int16.MaxValue;
            ValueType dest = UInt16.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_DifferentAsInternal_UInt64()
        {
            ValueType source = UInt64.MaxValue;
            ValueType dest = Int64.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_DifferentAsInternal_UInt32()
        {
            ValueType source = UInt32.MaxValue;
            ValueType dest = Int32.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_DifferentAsInternal_UInt16()
        {
            ValueType source = UInt16.MaxValue;
            ValueType dest = Int16.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_DifferentAsInternal_Decimal()
        {
            ValueType source = Decimal.MaxValue;
            ValueType dest = Int16.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_DifferentAsInternal_Single()
        {
            ValueType source = Single.MaxValue;
            ValueType dest = Int16.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_DifferentAsInternal_Double()
        {
            ValueType source = Double.MaxValue;
            ValueType dest = Int16.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_DifferentAsInternal_Char()
        {
            ValueType source = Char.MaxValue;
            ValueType dest = Int16.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_DifferentAsInternal_Byte()
        {
            ValueType source = Byte.MaxValue;
            ValueType dest = SByte.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_DifferentAsInternal_SByte()
        {
            ValueType source = SByte.MaxValue;
            ValueType dest = Byte.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_DifferentAsInternal_DateTime()
        {
            ValueType source = DateTime.MaxValue;
            ValueType dest = Int16.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_DifferentAsInternal_Boolean()
        {
            ValueType source = true;
            ValueType dest = Int16.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_DifferentAsInternal_Guid()
        {
            ValueType source = Guid.NewGuid();
            ValueType dest = Int16.MinValue;
            Identity item = new Identity(source);

            Assert.IsFalse(item.Equals(dest), "Object does not equal comparison value");
        }

        #endregion

        #region AnotherIdentity

        [TestMethod]
        public void IdentityTest_Equals_AnotherIdentity_SameValue_Guid()
        {
            ValueType source = Guid.NewGuid();
            ValueType dest = Guid.NewGuid();
            Identity item1 = new Identity(source);
            Identity item2 = new Identity(source);

            Assert.IsTrue(item1.Equals(item2), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_AnotherIdentity_DifferentValue_Guid()
        {
            ValueType source = Guid.NewGuid();
            ValueType dest = Guid.NewGuid();
            Identity item1 = new Identity(source);
            Identity item2 = new Identity(dest);

            Assert.IsFalse(item1.Equals(item2), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_AnotherIdentity_DifferentType_Guid()
        {
            ValueType source = Guid.NewGuid();
            ValueType dest = Int16.MaxValue;
            Identity item1 = new Identity(source);
            Identity item2 = new Identity(dest);

            Assert.IsFalse(item1.Equals(item2), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_AnotherIdentity_SameValue_Int32()
        {
            ValueType source = Int32.MaxValue;
            Identity item1 = new Identity(source);
            Identity item2 = new Identity(source);

            Assert.IsTrue(item1.Equals(item2), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_AnotherIdentity_DifferentValue_Int32()
        {
            ValueType source = Int32.MaxValue;
            ValueType dest = Int32.MinValue;
            Identity item1 = new Identity(source);
            Identity item2 = new Identity(dest);

            Assert.IsFalse(item1.Equals(item2), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_AnotherIdentity_DifferentType_Int32()
        {
            ValueType source = Int32.MaxValue;
            ValueType dest = Guid.NewGuid();
            Identity item1 = new Identity(source);
            Identity item2 = new Identity(dest);

            Assert.IsFalse(item1.Equals(item2), "Object does not equal comparison value");
        }

        #endregion

        #region Empty/Null

        [TestMethod]
        public void IdentityTest_Equals_Null()
        {
            ValueType source = Int32.MaxValue;
            Identity item1 = new Identity(source);

            Assert.IsFalse(item1.Equals(null), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_Empty()
        {
            ValueType source = Int32.MaxValue;
            Identity item1 = new Identity();

            Assert.IsFalse(item1.Equals(source), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_Empty_Null()
        {
            Identity item1 = new Identity();

            Assert.IsTrue(item1.Equals(null), "Object does not equal comparison value");
        }

        [TestMethod]
        public void IdentityTest_Equals_Empty_Empty()
        {
            Identity item1 = new Identity();
            Identity item2 = new Identity();

            Assert.IsTrue(item1.Equals(item2), "Object does not equal comparison value");
        }

        #endregion

        #endregion

        #region TryParse

        [TestMethod]
        [ExpectedException(typeof(ArgumentNullException))]
        public void IdentityTest_TryParse_NullInput()
        {
            Identity? parsedValue;
            Identity.TryParse(null, out parsedValue);
        }

        [TestMethod]
        public void IdentityTest_TryParse_Int16()
        {
            string testValue = Int16.MaxValue.ToString();
            Identity? parsedValue;
            Assert.IsTrue(Identity.TryParse(testValue, out parsedValue), "Failed to parse value");
            Assert.AreEqual(typeof(Int16), parsedValue.Value.UnderlyingType(), "Type mismatch");
        }

        [TestMethod]
        public void IdentityTest_TryParse_Int32()
        {
            string testValue = Int32.MaxValue.ToString();
            Identity? parsedValue;
            Assert.IsTrue(Identity.TryParse(testValue, out parsedValue), "Failed to parse value");
            Assert.AreEqual(typeof(Int32), parsedValue.Value.UnderlyingType(), "Type mismatch");
        }

        [TestMethod]
        public void IdentityTest_TryParse_Int64()
        {
            string testValue = Int64.MaxValue.ToString();
            Identity? parsedValue;
            Assert.IsTrue(Identity.TryParse(testValue, out parsedValue), "Failed to parse value");
            Assert.AreEqual(typeof(Int64), parsedValue.Value.UnderlyingType(), "Type mismatch");
        }

        [TestMethod]
        public void IdentityTest_TryParse_UInt64()
        {
            string testValue = UInt64.MaxValue.ToString();
            Identity? parsedValue;
            Assert.IsTrue(Identity.TryParse(testValue, out parsedValue), "Failed to parse value");
            Assert.AreEqual(typeof(UInt64), parsedValue.Value.UnderlyingType(), "Type mismatch");
        }

        [TestMethod]
        public void IdentityTest_TryParse_Decimal()
        {
            string testValue = "13246541635468463.65432165465";
            Identity? parsedValue;
            Assert.IsTrue(Identity.TryParse(testValue, out parsedValue), "Failed to parse value");
            Assert.AreEqual(typeof(Decimal), parsedValue.Value.UnderlyingType(), "Type mismatch");
        }

        [TestMethod]
        public void IdentityTest_TryParse_Guid()
        {
            string testValue = Guid.NewGuid().ToString();
            Identity? parsedValue;
            Assert.IsTrue(Identity.TryParse(testValue, out parsedValue), "Failed to parse value");
            Assert.AreEqual(typeof(Guid), parsedValue.Value.UnderlyingType(), "Type mismatch");
        }

        #endregion

        #region Parse

        [TestMethod]
        [ExpectedException(typeof(ArgumentNullException))]
        public void IdentityTest_Parse_NullInput()
        {
            Identity.Parse(null);
        }

        [TestMethod]
        [ExpectedException(typeof(InvalidCastException))]
        public void IdentityTest_Parse_InvalidInput()
        {
            Identity.Parse("Test Value");
        }

        [TestMethod]
        public void IdentityTest_Parse_Int16()
        {
            string testValue = Int16.MaxValue.ToString();
            Identity parsedValue = Identity.Parse(testValue);
            Assert.AreEqual(typeof(Int16), parsedValue.UnderlyingType(), "Type mismatch");
        }

        [TestMethod]
        public void IdentityTest_Parse_Int32()
        {
            string testValue = Int32.MaxValue.ToString();
            Identity parsedValue = Identity.Parse(testValue);
            Assert.AreEqual(typeof(Int32), parsedValue.UnderlyingType(), "Type mismatch");
        }

        [TestMethod]
        public void IdentityTest_Parse_Int64()
        {
            string testValue = Int64.MaxValue.ToString();
            Identity parsedValue = Identity.Parse(testValue);
            Assert.AreEqual(typeof(Int64), parsedValue.UnderlyingType(), "Type mismatch");
        }

        [TestMethod]
        public void IdentityTest_Parse_UInt64()
        {
            string testValue = UInt64.MaxValue.ToString();
            Identity parsedValue = Identity.Parse(testValue);
            Assert.AreEqual(typeof(UInt64), parsedValue.UnderlyingType(), "Type mismatch");
        }

        [TestMethod]
        public void IdentityTest_Parse_Decimal()
        {
            string testValue = "13246541635468463.65432165465";
            Identity parsedValue = Identity.Parse(testValue);
            Assert.AreEqual(typeof(Decimal), parsedValue.UnderlyingType(), "Type mismatch");
        }

        [TestMethod]
        public void IdentityTest_Parse_Guid()
        {
            string testValue = Guid.NewGuid().ToString();
            Identity parsedValue = Identity.Parse(testValue);
            Assert.AreEqual(typeof(Guid), parsedValue.UnderlyingType(), "Type mismatch");
        }

        #endregion

        #region Implicit Operator

        [TestMethod]
        public void IdentityTest_ImplicitOperator_Identity_Int16()
        {
            Identity value1 = Int16.MaxValue;
            Int16 value2 = value1;
        }

        [TestMethod]
        public void IdentityTest_ImplicitOperator_Identity_Int32()
        {
            Identity value1 = Int32.MaxValue;
            Int32 value2 = value1;
        }

        [TestMethod]
        public void IdentityTest_ImplicitOperator_Identity_Int64()
        {
            Identity value1 = Int64.MaxValue;
            Int64 value2 = value1;
        }

        [TestMethod]
        public void IdentityTest_ImplicitOperator_Identity_Guid()
        {
            Identity value1 = Guid.NewGuid();
            Guid value2 = value1;
        }

        #endregion

        #region Operators

        [TestMethod]
        public void IdentityTest_Operator_Identity_Identity()
        {
            Guid value1 = Guid.NewGuid();
            Identity source = new Identity(value1);
            Identity destination = new Identity(Guid.NewGuid());
            Assert.IsTrue(source != destination, "Operator matches");
            destination = new Identity(value1);
            Assert.IsTrue(source == destination, "Operator does not match");
        }

        [TestMethod]
        public void IdentityTest_Operator_Identity_Int16()
        {
            Identity value = new Identity(Int16.MinValue);
            Assert.IsTrue(value != Int16.MaxValue, "Operator matches");
            Assert.IsTrue(value == Int16.MinValue, "Operator does not match");
            Assert.IsTrue(Int16.MaxValue != value, "Operator matches");
            Assert.IsTrue(Int16.MinValue == value, "Operator does not match");
        }

        [TestMethod]
        public void IdentityTest_Operator_Identity_Int32()
        {
            Identity value = new Identity(Int32.MinValue);
            Assert.IsTrue(value != Int32.MaxValue, "Operator matches");
            Assert.IsTrue(value == Int32.MinValue, "Operator does not match");
            Assert.IsTrue(Int32.MaxValue != value, "Operator matches");
            Assert.IsTrue(Int32.MinValue == value, "Operator does not match");
        }

        [TestMethod]
        public void IdentityTest_Operator_Identity_Int64()
        {
            Identity value = new Identity(Int64.MinValue);
            Assert.IsTrue(value != Int64.MaxValue, "Operator matches");
            Assert.IsTrue(value == Int64.MinValue, "Operator does not match");
            Assert.IsTrue(Int64.MaxValue != value, "Operator matches");
            Assert.IsTrue(Int64.MinValue == value, "Operator does not match");
        }

        [TestMethod]
        public void IdentityTest_Operator_Identity_Guid()
        {
            Guid testValue1 = Guid.NewGuid();
            Identity value = new Identity(testValue1);
            Assert.IsTrue(value != Guid.NewGuid(), "Operator matches");
            Assert.IsTrue(value == testValue1, "Operator does not match");
            Assert.IsTrue(Guid.NewGuid() != value, "Operator matches");
            Assert.IsTrue(testValue1 == value, "Operator does not match");
        }

        #endregion
    }
}
